
var myLineChart;
var myLineChart1;
var myChart= echarts.init(document.getElementById('lineChart'))
var myChart1= echarts.init(document.getElementById('lineChart1'))
var flag=0;
var stop=true;
function change0(){
    if (myLineChart1 != null && myLineChart1 != "" && myLineChart1 != undefined) {
        myLineChart1.dispose();
    }
     myLineChart1 = echarts.init(document.getElementById("line_direction_chart1"));//冬季
    // myLineChart.setOption(line_direction_option);
    myLineChart1.setOption(line_direction_option1);
}

function change1(){
    if (myLineChart != null && myLineChart != "" && myLineChart != undefined) {
        myLineChart.dispose();
    }
    var nodeHighLight=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
    var edge1=["1#2", "0#4", "5#1", "1#6", "10#6", "4#5", "10#4", "3#7", "9#2", "7#8", "9#6", "0#2"];
    var resultEdge1=edge1;
    var path1='image://img2/littlesun.png';
    var path2='image://img2/littlexue.png';
    myLineChart1= echarts.init(document.getElementById("line_direction_chart1"));//冬季
        // myLineChart.setOption(line_direction_option);
        myLineChart1.setOption(line_direction_option3);
        var option = JSON.parse(JSON.stringify(line_direction_option));//转数组
        var dataLength1 = option.series[1].data.length;//线数组的长度
        for (var index in resultEdge1) {

            for (var j = 0; j < dataLength1; j++) {
                //获取所有线的描述名（即路径名）
                var deviceLineName = option.series[1].data[j].desc;
                //湿度影响新风机组或者温度影响地缘B 使用path的图片
                // if(((deviceLineName=="8#1"))&&(deviceLineName==resultEdge1[i])){
                //     if(option.series[1].data[j].effect.symbol=='none'){
                //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                //     }
                // }
                // else if(((deviceLineName=="8#4"))&&(deviceLineName==resultEdge1[i])){
                //     if(option.series[1].data[j].effect.symbol=='none'){
                //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                //     }
                // }
                // else if((deviceLineName=="7#6")&&(deviceLineName==resultEdge1[i])){
                //     if(option.series[1].data[j].effect.symbol=='none'){
                //         option.series[1].data[j].effect.symbol=path2;//将箭头图片赋值给symbol，实现流动箭头
                //     }
                // else
                // }

                if(((deviceLineName=="10#6"))&&(deviceLineName==resultEdge1[index])){
                    if(option.series[1].data[j].effect.symbol=='none'){
                        option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                    }
                }
                else  if(((deviceLineName=="0#2"))&&(deviceLineName==resultEdge1[index])){
                    if(option.series[1].data[j].effect.symbol=='none'){
                        option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                    }
                }
                else  if(((deviceLineName=="3#7"))&&(deviceLineName==resultEdge1[index])){
                    if(option.series[1].data[j].effect.symbol=='none'){
                        option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                    }
                }
                else  if(((deviceLineName=="7#8"))&&(deviceLineName==resultEdge1[index])){
                    if(option.series[1].data[j].effect.symbol=='none'){
                        option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                    }
                }
               else if (deviceLineName == resultEdge1[index]) {
                    if (option.series[1].data[j].effect.symbol == 'none') {
                        option.series[1].data[j].effect.symbol = path2;//将箭头图片赋值给symbol，实现流动箭头
                    }

                }
            }
        }
        //当前进度

        var nodeOption=option.series[0].data;
        var nodeValue=option.series[0].data;
        var nodeLength=nodeOption.length;
        for(var kIndex=0;kIndex<nodeLength;kIndex++)
            for(var nindex=0;nindex<nodeHighLight.length;nindex++) {
                // console.log(nodeValue[kIndex]);
                // console.log("---");
                // console.log(nodeHighLight[nindex]);
                if (nodeHighLight[nindex] == "0" && nodeValue[kIndex].desc== "0" && nodeHighLight[nindex]==nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/shiduH.png";

                }
                if (nodeHighLight[nindex] == "1" && nodeValue[kIndex].desc == "1" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/waterH.png";

                }
                if (nodeHighLight[nindex] == "2" && nodeValue[kIndex].desc == "2" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/ariH.png";

                }
                if (nodeHighLight[nindex] == "3" && nodeValue[kIndex].desc == "3" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/taiyangnengH.png";
                }
                if (nodeHighLight[nindex] == "4" && nodeValue[kIndex].desc == "4" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/lengquetaH.png";
                }
                if (nodeHighLight[nindex] == "5" && nodeValue[kIndex].desc == "5" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/rebengH.png";
                }
                if (nodeHighLight[nindex] == "6" && nodeValue[kIndex].desc == "6" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/floorH.png";
                }
                if (nodeHighLight[nindex] == "7" && nodeValue[kIndex].desc == "7" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/nuandianH.png";
                }
                if (nodeHighLight[nindex] == "8" && nodeValue[kIndex].desc == "8" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/reshuiH.png";
                }
                if (nodeHighLight[nindex] == "9" && nodeValue[kIndex].desc == "9" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/pipeH.png";
                }
                if (nodeHighLight[nindex] == "10" && nodeValue[kIndex].desc == "10" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                    option.series[0].data[kIndex].symbol = "image://img2/temH.png";
                }
            }

        myLineChart = echarts.init(document.getElementById("line_direction_chart"));
        myLineChart.setOption(option);
}
function topChartLoad(){
    if (myChart != null && myChart != "" && myChart != undefined) {
        myChart.dispose();
    }
    var arrEle=[11.3, 11.5, 10.9, 11.7, 9, 10.1, 155.7, 23.7, 88.6, 103.9, 116.5, 140.7, 137, 137.9, 156.4, 163.2, 150.6, 133.2, 83.5, 15.6, 14, 14.2, 12.3, 13.2];
    // window.localStorage.setItem("dlsValue",arrEle);
    // console.log("arrEle"+arrEle);
    var arr= [
            "(11:00~16:00)        水蓄能罐放冷至地板",
            "(0:00~23:00)        免费冷直供地板",
            "(9:00~12:00)        太阳能蓄热到暖电",
            "(9:00~17:00)        免费冷直供新风",
            "(9:00~17:00)        水蓄能罐放冷至新风",
            "(23:00~6:00)        暖电放热至生活热水换热器",
            "(23:00~6:00)        主机蓄冷至水蓄能罐"
        ];
    //动态生成工况开始
    var gongkuang1=document.getElementsByClassName("gongkuang")[0];
    gongkuang1.innerHTML='';
    for(var i=0;i<arr.length;i++){
        var newdiv=document.createElement("div");
        //     <!--                <div>-->
        //     <!--                    <img src="img2/computer.png" alt="" >-->
        //     <!--                    <span>工况6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;蓄能</span>-->
        //     <!--                    <div></div>-->
        //     <!--                </div>-->
        // <!--                <div>-->
        var newimg=document.createElement("img");
        newimg.setAttribute("src","img2/computer.png");
        newdiv.appendChild(newimg);
        var newdiv1=document.createElement("div");
        var newspan=document.createElement("span");
        newspan.innerHTML=arr[i];
        newdiv.appendChild(newspan);
        newdiv.appendChild(newdiv1);
        var gongkuang=document.getElementsByClassName("gongkuang")[0];
        gongkuang.appendChild(newdiv);
        // console.log(arr[i]);
    }
    var sum=0;
    for(var i=0;i<arrEle.length;i++){
        sum=sum+Number(arrEle[i]);
    }
    option1.title.subtext="明日电度:"+Number(sum).toFixed(0)+"kWh";
    myChart= echarts.init(document.getElementById('lineChart'));
    option1.series[0].data=arrEle;
    myChart.setOption(option1);
}
function topChartLoad1(){
    if (myChart1 != null && myChart1 != "" && myChart1 != undefined) {
        myChart1.dispose();
    }
    var arrEle= [0, 0, 0, 0, 0, 0, 0, 183.3, 192.9, 220.8, 258.5, 353.1, 361.8, 367.6, 460.9, 471.1, 424, 317.7, 0, 0, 0, 0, 0, 0];
    var sum=0;
    for(var i=0;i<arrEle.length;i++){
        sum=sum+Number(arrEle[i]);
    }
    myChart1= echarts.init(document.getElementById('lineChart1'));
    option2.title.subtext="明日能量:"+Number(sum).toFixed(0)+"kWh";
    option2.series[0].data=arrEle;
    myChart1.setOption(option2);
}
function topChart(){
    if (myChart != null && myChart != "" && myChart != undefined) {
        myChart.dispose();
    }
    var tem1=document.getElementById("tem1");
    var tem2=document.getElementById("tem2");
    var hum1=document.getElementById("hum1");
    var hum2=document.getElementById("hum2");
    var tem1Value=tem1.value;
    var tem2Value=tem2.value;
    var hum1Value=hum1.value;
    var hum2Value=hum2.value;
    var flag=window.localStorage.getItem("flag");
    var people=document.getElementById("people");
    var peopleValue=people.value;
    var peopleNumber=Number(peopleValue);
    var flag1=Number(flag);
    console.log(tem1Value+tem2Value+hum1Value+hum2Value+flag1+peopleNumber);
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/multipower/strategy/getHourData",
        data:{tem1:tem1Value,tem2:tem2Value,hum1:hum1Value,hum2:hum2Value,flag:flag1,person:peopleNumber},
        success: function(result) {
            console.log("热量数据");
            var arrEle=result.dls;
           window.localStorage.setItem("dlsValue",arrEle);
            console.log("arrEle"+arrEle);
            var arr=result.gongkuang;
            //动态生成工况开始
            var gongkuang1=document.getElementsByClassName("gongkuang")[0];
            gongkuang1.innerHTML='';
            for(var i=0;i<arr.length;i++){
                var newdiv=document.createElement("div");
                //     <!--                <div>-->
                //     <!--                    <img src="img2/computer.png" alt="" >-->
                //     <!--                    <span>工况6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;蓄能</span>-->
                //     <!--                    <div></div>-->
                //     <!--                </div>-->
                // <!--                <div>-->
                var newimg=document.createElement("img");
                newimg.setAttribute("src","img2/computer.png");
                newdiv.appendChild(newimg);
                var newdiv1=document.createElement("div");
                var newspan=document.createElement("span");
                newspan.innerHTML=arr[i];
                newdiv.appendChild(newspan);
                newdiv.appendChild(newdiv1);
                var gongkuang=document.getElementsByClassName("gongkuang")[0];
                gongkuang.appendChild(newdiv);
                // console.log(arr[i]);
            }
            var sum=0;
            for(var i=0;i<arrEle.length;i++){
                sum=sum+Number(arrEle[i]);
            }
            option1.title.subtext="明日电度:"+Number(sum).toFixed(0)+"kWh";
            myChart= echarts.init(document.getElementById('lineChart'));
            option1.series[0].data=arrEle;
            myChart.setOption(option1);
        },
    })

}
function topChart1(){
    if (myChart1 != null && myChart1 != "" && myChart1 != undefined) {
        myChart1.dispose();
    }
    var tem1=document.getElementById("tem1");
    var tem2=document.getElementById("tem2");
    var hum1=document.getElementById("hum1");
    var hum2=document.getElementById("hum2");
    var tem1Value=tem1.value;
    var tem2Value=tem2.value;
    var hum1Value=hum1.value;
    var hum2Value=hum2.value;
    var flag=window.localStorage.getItem("flag");
    var people=document.getElementById("people");
    var peopleValue=people.value;
    var peopleNumber=Number(peopleValue);
    var flag1=Number(flag);
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/multipower/strategy/getHourData",
        data:{tem1:tem1Value,tem2:tem2Value,hum1:hum1Value,hum2:hum2Value,flag:flag1,person:peopleNumber},
        success: function(result) {
            console.log("热量数据");
            var arrEle=result.nls;
            window.localStorage.setItem("nlsValue",arrEle);
            var sum=0;
            for(var i=0;i<arrEle.length;i++){
                sum=sum+Number(arrEle[i]);
            }
            myChart1= echarts.init(document.getElementById('lineChart1'));
            option2.title.subtext="明日能量:"+Number(sum).toFixed(0)+"kWh";
            option2.series[0].data=arrEle;
            myChart1.setOption(option2);

        },
    })

}
var option1 = {

    title: {
        text: '小时电度预测',
        subtext:"明日电量",
        subtextStyle:{
            color:"#fff",
            fontSize:20
        },
        x: '50' ,
        padding:[0,0,0,50],
        textStyle: {
            color: "#fff",
            fontSize:'16',
            fontWeight:'500'
        },
    },
    animation:false,
    // animationDuration:15000,

    legend: {
        // orient 设置布局方式，默认水平布局，可选值：'horizontal'（水平） ¦ 'vertical'（垂直）
        orient: 'horizontal',
        // x 设置水平安放位置，默认全图居中，可选值：'center' ¦ 'left' ¦ 'right' ¦ {number}（x坐标，单位px）
        x: '400',
        // y 设置垂直安放位置，默认全图顶端，可选值：'top' ¦ 'bottom' ¦ 'center' ¦ {number}（y坐标，单位px）
        y: '30',
        data: ['电度'],
        textStyle: {
            //标题颜色
            color: "#fff"
        },
    },

    //  图表距边框的距离,可选值：'百分比'¦ {number}（单位px）
    grid: {
        top: '26%',   // 等价于 y: '16%'
        left: '3%',
        right: '8%',
        bottom: '3%',
        containLabel: true
    },

    // 提示框
    tooltip: {
        trigger: 'axis'
    },

    // //工具框，可以选择
    // toolbox: {
    //     feature: {
    //         saveAsImage: {} //下载工具
    //     }
    // },

    xAxis: {
        type: 'category',
        axisLine: {
            lineStyle: {
                // 设置x轴颜色
                color: '#fff'
            }
        },
        // 设置X轴数据旋转倾斜
        axisLabel: {
            rotate: 0, // 旋转角度
            interval: 1  //设置X轴数据间隔几个显示一个，为0表示都显示
        },
        // boundaryGap值为false的时候，折线第一个点在y轴上
        boundaryGap: false,
        data:["00:00","01:00","02:00","03:00","04:00","05:00",
            "06:00","07:00","08:00","09:00","10:00","11:00",
            "12:00","13:00","14:00","15:00","16:00","17:00",
            "18:00","19:00","20:00","21:00","22:00","23:00"]
    },

    yAxis: {
        name: 'KWh',
        type: 'value',
        // min:0, // 设置y轴刻度的最小值
        // max:1800,  // 设置y轴刻度的最大值
        splitNumber:9,  // 设置y轴刻度间隔个数
        axisLine: {
            lineStyle: {
                // 设置y轴颜色
                color: '#fff'
            }
        },
    },

    series: [
        {
            name: '电度',
            data: [],
            // [820, 932, 301, 1434, 1290, 1330, 1320,
            // 810,900,700,1000,1200,1700,
            // 1200,900,1300,1400,1500,800,950,
            // 890, 1000, 301,500 ],
            type: 'line',
            // 设置小圆点消失
            // 注意：设置symbol: 'none'以后，拐点不存在了，设置拐点上显示数值无效
            symbol: 'none',
            // 设置折线弧度，取值：0-1之间
            smooth: 0.5,
            itemStyle:{
                normal:{
                    // 拐点上显示数值
                    label : {
                        show: true
                    },
                    borderColor:'red',  // 拐点边框颜色
                    lineStyle:{
                        width:3,  // 设置线宽
                        type:'solid'  //'dotted'虚线 'solid'实线
                    }
                }
            }
        },

    ],

    color: [ '#eeb151']
};
var option2 = {

    title: {
        text: '小时能量预测',
        subtext:"明日电量",
        subtextStyle:{
            color:"#fff",
            fontSize:20
        },
        x: '50' ,
        padding:[0,0,0,50],
        textStyle: {
            color: "#fff",
            fontSize:'16',
            fontWeight:'500'
        },
    },
    animation:false,


    legend: {
        // orient 设置布局方式，默认水平布局，可选值：'horizontal'（水平） ¦ 'vertical'（垂直）
        orient: 'horizontal',
        // x 设置水平安放位置，默认全图居中，可选值：'center' ¦ 'left' ¦ 'right' ¦ {number}（x坐标，单位px）
        x: '400',
        // y 设置垂直安放位置，默认全图顶端，可选值：'top' ¦ 'bottom' ¦ 'center' ¦ {number}（y坐标，单位px）
        y: '30',
        data: ['能量'],
        textStyle: {
            //标题颜色
            color: "#fff"
        },
    },

    //  图表距边框的距离,可选值：'百分比'¦ {number}（单位px）
    grid: {
        top: '26%',   // 等价于 y: '16%'
        left: '3%',
        right: '8%',
        bottom: '3%',
        containLabel: true
    },

    // 提示框
    tooltip: {
        trigger: 'axis'
    },

    // //工具框，可以选择
    // toolbox: {
    //     feature: {
    //         saveAsImage: {} //下载工具
    //     }
    // },

    xAxis: {
        type: 'category',
        axisLine: {
            lineStyle: {
                // 设置x轴颜色
                color: '#fff'
            }
        },
        // 设置X轴数据旋转倾斜
        axisLabel: {
            rotate: 0, // 旋转角度
            interval: 1  //设置X轴数据间隔几个显示一个，为0表示都显示
        },
        // boundaryGap值为false的时候，折线第一个点在y轴上
        boundaryGap: false,
        data:["00:00","01:00","02:00","03:00","04:00","05:00",
            "06:00","07:00","08:00","09:00","10:00","11:00",
            "12:00","13:00","14:00","15:00","16:00","17:00",
            "18:00","19:00","20:00","21:00","22:00","23:00"]
    },

    yAxis: {
        name: 'KWh',
        type: 'value',
        // min:0, // 设置y轴刻度的最小值
        // max:1800,  // 设置y轴刻度的最大值
        splitNumber:9,  // 设置y轴刻度间隔个数
        axisLine: {
            lineStyle: {
                // 设置y轴颜色
                color: '#fff'
            }
        },
    },

    series: [
        {
            name: '能量',
            data:[],
            // [620, 732, 941, 834, 1690, 1030, 920,
            //     620, 732, 941, 834, 1690, 1030, 920,
            //
            //     620, 732, 941, 834, 1690, 1030, 920,
            //     620, 732, 941],
            type: 'line',
            symbol: 'none',
            smooth: 0.5,
            // 设置折线上圆点大小
            symbolSize:8,
            // itemStyle:{
            //     normal:{
            //         // 拐点上显示数值
            //         label : {
            //             show: true
            //         },
            //         borderColor:'red',  // 拐点边框颜色
            //         lineStyle:{
            //             width:5,  // 设置线宽
            //             type:'solid'  //'dotted'虚线 'solid'实线
            //         }
            //     }
            // }
        },
    ],

    color: ['#ea7a80']
};
function  dataFirst(){
    //myChart如果已经存在则直接销毁。
    var tem1=document.getElementById("tem1");
    var tem2=document.getElementById("tem2");
    var tem1Value=tem1.value;
    var tem2Value=tem2.value;
    var tem1ValueNumber=Number(tem1Value);//number类型
    var tem2ValueNumber=Number(tem2Value);
    var humidityText1=document.getElementById("hum1");
    var humidityText2=document.getElementById("hum2");
    var hum1=humidityText1.value;
    var hum2=humidityText2.value;
    var flag=window.localStorage.getItem("flag");
    var people=document.getElementById("people");
    var peopleValue=people.value;
    var peopleNumber=Number(peopleValue);
    var flag1=Number(flag);
    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/multipower/strategy/getHourData",
        data:{tem1:tem1Value,tem2:tem2Value,hum1:hum1,hum2:hum2,flag:flag1,person:peopleNumber},//温度数据
        success: function(result) {
            if(stop==false){
                return false;
            }
            topChart();
            topChart1();
            // var arr=result.gongkuang;
            var nodeHighLight=result.node;
            //动态生成工况开始

            //动态生成工况结束
            //     var airLine="3#6";
            //     var humidityLine="7#6";
            //     var temLine="8#1";//温度影响免费冷
            //     var temLine1="8#4";//温度影响地缘热泵B
            //     console.log(result.path);
            //     console.log(typeof result.path);
            //     //复合开始
            //     //处理复合工况
            var edge1=result.path;
            console.log("path"+edge1);
            // console.log(edge1);
            var resultEdge1=edge1;
            // if(temValue>=32){
            //     resultEdge1.push(temLine);
            // }
            //     //判断温度是否在范围内
            //     if(temValueNumber<20||temValueNumber>40){
            //         layer.alert('请输入20-40度之间的温度数据', {
            //
            //             icon: 5,
            //
            //             title: "提示"
            //
            //         });
            //     }
            //     //判断湿度是否在范围内
            //     if(humidityValue<30||humidityValue>90){
            //         layer.alert('请输入30%-90%之间的湿度数据', {
            //
            //             icon: 5,
            //
            //             title: "提示"
            //
            //         });
            //     }
            //     if((temValueNumber<20||temValueNumber>40)&&(humidityValue<30||humidityValue>90)){
            //         layer.alert('请输入20-40度之间的温度数据,30%-90%之间的湿度数据', {
            //
            //             icon: 5,
            //
            //             title: "提示"
            //
            //         });
            //     }
            //     if(humidity>="75"){
            //         resultEdge1.push(airLine);
            //         resultEdge1.push(humidityLine);
            //     }
            //
            // for(var index1=0;index1<edge1.length;index1++){
            //     var result1=edge1[index1].split("#").reverse().join("#");
            //     var resultLength1=result1.length;
            //     for(var index=3;index<resultLength1+2;index=index+2){
            //         resultEdge1.push(result1.substring(index-3,index))
            //
            //     }
            // }
            var path1='image://img2/littlesun.png';
            var path2='image://img2/littlexue.png';
            //
            if(tem1ValueNumber>=16) {
                if (myLineChart != null && myLineChart != "" && myLineChart != undefined) {
                    myLineChart.dispose();
                }
                if (myLineChart1 != null && myLineChart1 != "" && myLineChart1 != undefined) {
                    myLineChart1.dispose();
                }
                // myLineChart1 = echarts.init(document.getElementById("line_direction_chart1"));//冬季
                // // myLineChart.setOption(line_direction_option);
                // myLineChart1.setOption(line_direction_option3);
                var option = JSON.parse(JSON.stringify(line_direction_option));//转数组
                var dataLength1 = option.series[1].data.length;//线数组的长度
                for (var index in resultEdge1) {

                    for (var j = 0; j < dataLength1; j++) {
                        //获取所有线的描述名（即路径名）
                        var deviceLineName = option.series[1].data[j].desc;
                        //湿度影响新风机组或者温度影响地缘B 使用path的图片
                        // if(((deviceLineName=="8#1"))&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // }
                        // else if(((deviceLineName=="8#4"))&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // }
                        // else if((deviceLineName=="7#6")&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path2;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // else
                        // }
                        if(((deviceLineName=="10#6"))&&(deviceLineName==resultEdge1[index])){
                            if(option.series[1].data[j].effect.symbol=='none'){
                                option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                            }
                        }
                        else  if(((deviceLineName=="0#2"))&&(deviceLineName==resultEdge1[index])){
                            if(option.series[1].data[j].effect.symbol=='none'){
                                option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                            }
                        }
                        else  if(((deviceLineName=="3#7"))&&(deviceLineName==resultEdge1[index])){
                            if(option.series[1].data[j].effect.symbol=='none'){
                                option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                            }
                        }
                        else  if(((deviceLineName=="7#8"))&&(deviceLineName==resultEdge1[index])){
                            if(option.series[1].data[j].effect.symbol=='none'){
                                option.series[1].data[j].effect.symbol=path1;//将箭头图片赋值给symbol，实现流动箭头
                            }
                        }
                        else if (deviceLineName == resultEdge1[index]) {
                            if (option.series[1].data[j].effect.symbol == 'none') {
                                option.series[1].data[j].effect.symbol = path2;//将箭头图片赋值给symbol，实现流动箭头
                            }

                        }
                    }
                }
                //当前进度
                var nodeOption=option.series[0].data;
                var nodeValue=option.series[0].data;
                var nodeLength=nodeOption.length;
                for(var kIndex=0;kIndex<nodeLength;kIndex++)
                    for(var nindex=0;nindex<nodeHighLight.length;nindex++) {
                        // console.log(nodeValue[kIndex]);
                        // console.log("---");
                        // console.log(nodeHighLight[nindex]);
                        if (nodeHighLight[nindex] == "0" && nodeValue[kIndex].desc== "0" && nodeHighLight[nindex]==nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/shiduH.png";

                        }
                        if (nodeHighLight[nindex] == "1" && nodeValue[kIndex].desc == "1" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/waterH.png";

                        }
                        if (nodeHighLight[nindex] == "2" && nodeValue[kIndex].desc == "2" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/ariH.png";

                        }
                        if (nodeHighLight[nindex] == "3" && nodeValue[kIndex].desc == "3" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/taiyangnengH.png";
                        }
                        if (nodeHighLight[nindex] == "4" && nodeValue[kIndex].desc == "4" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/lengquetaH.png";
                        }
                        if (nodeHighLight[nindex] == "5" && nodeValue[kIndex].desc == "5" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/rebengH.png";
                        }
                        if (nodeHighLight[nindex] == "6" && nodeValue[kIndex].desc == "6" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/floorH.png";
                        }
                        if (nodeHighLight[nindex] == "7" && nodeValue[kIndex].desc == "7" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/nuandianH.png";
                        }
                        if (nodeHighLight[nindex] == "8" && nodeValue[kIndex].desc == "8" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/reshuiH.png";
                        }
                        if (nodeHighLight[nindex] == "9" && nodeValue[kIndex].desc == "9" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/pipeH.png";
                        }
                        if (nodeHighLight[nindex] == "10" && nodeValue[kIndex].desc == "10" && nodeHighLight[nindex] == nodeValue[kIndex].desc) {
                            option.series[0].data[kIndex].symbol = "image://img2/temH.png";
                        }
                    }

                myLineChart = echarts.init(document.getElementById("line_direction_chart"));
                myLineChart.setOption(option);
            }
            if(tem1ValueNumber<16){
                if (myLineChart1 != null && myLineChart1 != "" && myLineChart1 != undefined) {
                    myLineChart1.dispose();
                }
                if (myLineChart != null && myLineChart != "" && myLineChart != undefined) {
                    myLineChart.dispose();
                }
                // myLineChart = echarts.init(document.getElementById("line_direction_chart"));//夏季
                // myLineChart.setOption(line_direction_option2);
                var option1 = JSON.parse(JSON.stringify(line_direction_option1));//转数组
                var dataLength2 = option1.series[1].data.length;//线数组的长度
                for (var index1 in resultEdge1) {

                    for (var jIndex = 0; jIndex < dataLength2; jIndex++) {
                        //获取所有线的描述名（即路径名）
                        var deviceLineName = option1.series[1].data[jIndex].desc;
                        //湿度影响新风机组或者温度影响地缘B 使用path的图片
                        // if(((deviceLineName=="8#1"))&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // }
                        // else if(((deviceLineName=="8#4"))&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // }
                        // else if((deviceLineName=="7#6")&&(deviceLineName==resultEdge1[i])){
                        //     if(option.series[1].data[j].effect.symbol=='none'){
                        //         option.series[1].data[j].effect.symbol=path2;//将箭头图片赋值给symbol，实现流动箭头
                        //     }
                        // }
                        // else
                        if (deviceLineName == resultEdge1[index1]) {
                            if (option1.series[1].data[jIndex].effect.symbol == 'none') {
                                option1.series[1].data[jIndex].effect.symbol = path1;//将箭头图片赋值给symbol，实现流动箭头
                            }

                        }
                    }
                }

                var nodeOption1=option1.series[0].data;
                var nodeValue1=option1.series[0].data;
                var nodeLength1=nodeOption1.length;
                for(var kIndex1=0;kIndex1<nodeLength1;kIndex1++)
                    for(var nindex1=0;nindex1<nodeHighLight.length;nindex1++) {
                        // console.log(nodeValue1[kIndex1]);
                        // console.log("---");
                        // console.log(nodeHighLight[nindex1]);
                        if (nodeHighLight[nindex1] == "0" && nodeValue1[kIndex1].desc== "0" && nodeHighLight[nindex1]==nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/shiduH.png";

                        }
                        if (nodeHighLight[nindex1] == "1" && nodeValue1[kIndex1].desc == "1" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/taiyangnengH.png";

                        }
                        if (nodeHighLight[nindex1] == "2" && nodeValue1[kIndex1].desc == "2" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/waterH.png";

                        }
                        if (nodeHighLight[nindex1] == "3" && nodeValue1[kIndex1].desc == "3" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/rebengH.png";


                        }
                        if (nodeHighLight[nindex1] == "4" && nodeValue1[kIndex1].desc == "4" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/pipeH.png";


                        }
                        if (nodeHighLight[nindex1] == "5" && nodeValue1[kIndex1].desc == "5" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/temH.png";


                        }
                        if (nodeHighLight[nindex1] == "6" && nodeValue1[kIndex1].desc == "6" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/ariH.png";


                        }
                        if (nodeHighLight[nindex1] == "7" && nodeValue1[kIndex1].desc == "7" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/floorH.png";


                        }
                        if (nodeHighLight[nindex1] == "8" && nodeValue1[kIndex1].desc == "8" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/shidianH.png";


                        }
                        if (nodeHighLight[nindex1] == "9" && nodeValue1[kIndex1].desc == "9" && nodeHighLight[nindex1] == nodeValue1[kIndex1].desc) {
                            option1.series[0].data[kIndex1].symbol = "image://img2/reshuiH.png";


                        }




                    }


                //不需要清空
                //  tem1.value = '';
                // tem2.value = '';
                // humidityText1.value = '';
                // humidityText2.value = '';
                myLineChart1 = echarts.init(document.getElementById("line_direction_chart1"));
                myLineChart1.setOption(option1);

            }
        },

    })
    // for(var j=10;j<20;j++){
    //     console.log("j="+j);
    // }
    // console.log("xianzaishi2");
}
function summerIni(){
    var newDiv=document.createElement("div");
    var div=document.getElementById("tupu");
    // var newDiv1=document.createElement("div");
    newDiv.setAttribute("class","newTitle");
    newDiv.setAttribute("id","summer");
    newDiv.innerHTML="夏季策略";
    div.appendChild(newDiv);
}
function change(){
    //myChart如果已经存在则直接销毁。
    window.localStorage.setItem("canMove","1");
    var moveValue=window.localStorage.getItem("canMove");
    console.log("moveValue"+moveValue);
    var tem1=document.getElementById("tem1");
    var tem2=document.getElementById("tem2");
    var people=document.getElementById("people");
    var peopleValue=people.value;
    var peopleNumber=Number(peopleValue);
    var tem1Value=tem1.value;
    var tem2Value=tem2.value;
    var tem1ValueNumber=Number(tem1Value);//number类型
    var tem2ValueNumber=Number(tem2Value);
    var humidityText1=document.getElementById("hum1");
    var humidityText2=document.getElementById("hum2");
    var hum1=humidityText1.value;
    var hum2=humidityText2.value;
    var hum1ValueNumber=Number(hum1); //number类型
    var hum2ValueNumber=Number(hum2);
    var tem1Tem2=tem2ValueNumber-tem1ValueNumber;
    var hum1Hum2=hum2ValueNumber-hum1ValueNumber;
    console.log("温度差为"+tem1Tem2);
    if(Number(tem1Tem2)>15){
        layer.alert('温度差不能超过15!', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(tem1Tem2)<0){
        layer.alert('请输入合理的温度,后者大于前者!', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(hum1Hum2)<0){
        layer.alert('请输入合理的湿度，后者大于前者!', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(tem1ValueNumber)<-15){
        layer.alert('请输入合理的最低温度，大于-15度', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(tem2ValueNumber)>42){
        layer.alert('请输入合理的最高温度，42度以下!', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(hum1ValueNumber)<0){
        layer.alert('请输入合理的最低湿度，大于0！', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(hum2ValueNumber)>100){
        layer.alert('请输入合理的最高湿度，小于100', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    if(Number(peopleNumber)<0){
        layer.alert('请输入合理的人数，大于0！', {

            icon: 5,

            title: "提示"

        });
        stop=false;
    }
    else if(Number(tem1Tem2)<=15){
        stop=true;
    }
    var weather = document.getElementById("weather");
    var weatherIndex = weather.selectedIndex;
    var tianqi=Number(weather.options[weatherIndex].value);
    console.log("tianqi"+tianqi);
    console.log(typeof tianqi);

    var tem1Value1=Number(tem1.value);
    if(tem1Value1>=16){
        $("#one")[0].checked=false;
        $("#two")[0].checked=true;
        var newDiv=document.createElement("div");
        var div=document.getElementById("tupu");
        // var newDiv1=document.createElement("div");
        newDiv.setAttribute("class","newTitle");
        newDiv.setAttribute("id","summer");
        newDiv.innerHTML="夏季策略";
        div.appendChild(newDiv);
    }
    else if(tem1Value1<16){
        $("#one")[0].checked=true;
        $("#two")[0].checked=false;
        var newDiv=document.createElement("div");
        var div=document.getElementById("tupu");
        // var newDiv1=document.createElement("div");
        newDiv.setAttribute("class","newTitle");
        newDiv.setAttribute("id","winter");
        newDiv.innerHTML="冬季策略";
        div.appendChild(newDiv);
    }
    if(tem1ValueNumber>=16){
        flag=1;
        localStorage.setItem("flag",flag.toString());
    }
    else{
        flag=0;
        localStorage.setItem("flag",flag.toString());
    }

    $.ajax({
        type: "POST",
        dataType: "json",
        url: "/multipower/demo/data",
        data: {tem1: tem1ValueNumber, tem2: tem2ValueNumber, hum1: hum1ValueNumber, hum2: hum2ValueNumber,flag:flag,peopleNumber:peopleNumber,tianqi:tianqi},//温度数据
        success: function (result) {
            console.log("数据开始");
            var value=JSON.stringify(result);
            localStorage.setItem("valueData",value);
            console.log("result"+value);
            window.sessionStorage.setItem("btnStatus","true");
            if(flag==1){
                //夏季数据缓存
                var otherValue=result.other;
                var xunengValue=result.xuneng;
                var guangreValue=result.guangre;
                var diyuanrebengValue=result.zhujizhigong;
                var dianliangValue=result.dianliang;
                var diannengValue=result.dianneng;
                var guangfuValue=result.guangfu;
                // var nuantongValue=result.nuantong;
                // console.log("nuantong"+nuantongValue);
                // var xinfengjizuValue=result.xinfengjizu;
                var bangongValue=result.bangong;
                var dimaiguanValue=result.dimaiguan;
                var temValue=result.temperature;
                var humValue=result.humidity;
                var nuandianValue=result.nuandian;
                var zhaomingValue=result.zhaoming;
                var zhujixunengValue=result.zhujixuleng;
                var xiaofangValue=result.xiaofang;
                var xuqiuValue=result.xuqiu;
                var meetingValue=result.meetingData;
                var resValue=result.restaurantData;


                window.localStorage.setItem("res",resValue);
                window.localStorage.setItem("meet",meetingValue);
                window.localStorage.setItem("guangfu",guangfuValue);
                window.localStorage.setItem("xuqiu",xuqiuValue);
                window.localStorage.setItem("other",otherValue.toString());
                window.localStorage.setItem("xuneng",xunengValue);
                window.localStorage.setItem("guangre",guangreValue);
                window.localStorage.setItem("rebeng",diyuanrebengValue);//相当于主机直供
                window.localStorage.setItem("dianliang",dianliangValue);
                window.localStorage.setItem("dianneng",diannengValue);

                // window.localStorage.setItem("nuantong",nuantongValue);
                // window.localStorage.setItem("xinfengjizu",xinfengjizuValue);
                window.localStorage.setItem("bangong",bangongValue);
                window.localStorage.setItem("dimaiguan",dimaiguanValue);
                window.localStorage.setItem("tem",temValue);
                window.localStorage.setItem("hum",humValue);
                window.localStorage.setItem("nuandian",nuandianValue);
                window.localStorage.setItem("zhaoming",zhaomingValue);
                window.localStorage.setItem("zhujixuneng",zhujixunengValue);//相当于主机蓄冷
                window.localStorage.setItem("xiaofang",xiaofangValue);
            }
            if(flag==0){
                //冬季数据缓存
                var otherValue1=result.other;
                var xunengValue1=result.xuneng;
                var guangreValue1=result.guangre;
                var diyuanrebengValue1=result.zhujizhigong;
                var dianliangValue1=result.dianliang;
                var diannengValue1=result.dianneng;
                var guangfuValue1=result.guangfu;


                // var nuantongValue1=result.nuantong;
                var bangongValue1=result.bangong;
                var dimaiguanValue1=result.dimaiguan;
                var temValue1=result.temperature;
                var zhaomingValue1=result.zhaoming;
                var xiaofangValue1=result.xiaofang;
                var humValue=result.humidity;
                var zhujixunengValue1=result.zhujixuleng;
                var xuqiuValue=result.xuqiu;
                var meetingValue=result.meetingData;
                var resValue=result.restaurantData;
                window.localStorage.setItem("res",resValue);
                window.localStorage.setItem("meet",meetingValue);
                window.localStorage.setItem("guangfu",guangfuValue1);
                window.localStorage.setItem("xuqiu",xuqiuValue);
                window.localStorage.setItem("zhujixuneng",zhujixunengValue1);
                window.localStorage.setItem("other",otherValue1.toString());
                window.localStorage.setItem("xuneng",xunengValue1);
                window.localStorage.setItem("guangre",guangreValue1);
                window.localStorage.setItem("rebeng",diyuanrebengValue1);
                window.localStorage.setItem("dianliang",dianliangValue1);
                window.localStorage.setItem("dianneng",diannengValue1);

                // window.localStorage.setItem("nuantong",nuantongValue1);
                window.localStorage.setItem("bangong",bangongValue1);
                window.localStorage.setItem("dimaiguan",dimaiguanValue1);
                window.localStorage.setItem("tem",temValue1);
                window.localStorage.setItem("zhaoming",zhaomingValue1);
                window.localStorage.setItem("xiaofang",xiaofangValue1);
                window.localStorage.setItem("hum",humValue);

            }
            console.log("xianzaishi1");
            for(var k=0;k<10;k++){
                console.log("k="+k);
            }
            dataFirst();
        }
    });

    // $.ajax({
    //     type: "POST",
    //     dataType: "json",
    //     url: "/multipower/strategy/getHourData",
    //     data:{tem1:tem1Value,tem2:tem2Value,hum1:hum1,hum2:hum2},
    //     success: function(result) {
    //         console.log("热量数据");
    //         console.log(result);
    //         var arrEle=result.nls;
    //         myChart1= echarts.init(document.getElementById('lineChart1'));
    //         option2.series[0].data=arrEle;
    //         myChart1.setOption(option2);
    //     },
    // })

    return false;
}

var line_direction_option2 = {
    // backgroundColor: '#041235',
    // backgroundColor:'#ffffff',
    // 图的标题
    title: {
        // text: '夏季能源知识图谱',
        left: '-5',
        top: '10px',
        textStyle: {
            color: '#ffffff',
            fontFamily: '微软雅黑',
            fontWeight: 'lighter',
            fontSize: 18
        },


    },
    // 提示框的配置
    tooltip: {
        trigger: 'item',
        formatter:"{b0}",


    },
    // 工具箱
    // toolbox: {
    //     // 显示工具箱
    //     show: true,
    //     feature: {
    //         mark: {
    //             show: true
    //         },
    //         // 还原
    //         restore: {
    //             show: true
    //         },
    //         // 保存为图片
    //         saveAsImage: {
    //             show: true
    //         }
    //     }
    // },
    //     legend: [{
    //     // selectedMode: 'single',
    //     data: categories.map(function (a) {
    //     return a.name;
    // })
    // }],

    xAxis: {
        type: 'value',
        boundaryGap: false,
        show: false
    },
    yAxis: {
        type: 'value',
        show: false
    },
    series: [{
        type: 'graph',
        layout: 'none',
        // silent: true,          //不响应鼠标事件
        coordinateSystem: 'cartesian2d',
        symbolSize: 20,
        showEffectOn: 'render',
        zlevel: 2,
        rippleEffect: {
            period: 3, //波纹秒数
            brushType: 'fill', //stroke(涟漪)和fill(扩散)，两种效果
            scale: 10 //波纹范围
        },
        hoverAnimation: true,

        label: {
            normal: {
                show: true,
                position: 'bottom',//设置label显示的位置
                // formatter: '{c}',//设置label读取的值为value
                textStyle: {
                    fontSize: '18'
                },
            }
        },

        // label: {
        //     normal: {
        //         show: true
        //     }
        // },

        data: [
            // points
            {
                "name":"冷却塔",
                desc:"4",
                "value":[0,120],
                symbolSize:[80,120],
                symbol:'image://img2/lengqueta.png',
                selected:true,
                itemStyle: {
                    color: '#fff',
                }

            },
            {
                "name":"湿度",
                desc:"0",
                "value":[100,280],
                symbolSize:[70,85],
                symbol:'image://img2/humidity.png',
                selected:true,
                itemStyle: {
                    color: '#fff',
                }

            },
            // {
            //     "name":"太阳能",
            //     "value":[150,220],
            //     symbolSize:80,
            //     selected:true,
            //     symbol:'image://img/sun.png',
            //     itemStyle: {
            //         color: '#c23531'
            //     }
            // },
            {
                "name":"水蓄能",
                desc:"1",
                "value":[100,200],
                symbolSize:[80,75],
                selected:true,
                symbol:'image://img2/shuixuneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地源热泵主机",
                desc:"5",
                "value":[100,120],
                symbolSize:[75,70],
                selected:true,
                symbol:'image://img2/rebeng.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地埋管",
                desc:"9",
                "value":[100,30],
                symbolSize:[90,70],
                selected:true,
                symbol:'image://img2/pipe.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"温度",
                desc:"10",
                "value":[100,-46],
                symbolSize:[60,85],
                selected:true,
                symbol:'image://img2/tem.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"新风机组",
                desc:"2",
                "value":[300,220],
                symbolSize:[80,70],
                symbol:'image://img2/air.png',
                selected:true,
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地板辐射",
                desc:"6",
                "value":[310,80],
                symbolSize:[80,75],
                selected:true,
                symbol:'image://img2/floor.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"太阳能",
                desc:"3",
                "value":[450,180],
                symbolSize:[80,100],
                symbol:'image://img2/taiyangneng.png',
                selected:true,
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"生活热水箱",
                desc:"8",
                "value":[500,80],
                symbolSize:[60,80],
                selected:true,
                symbol:'image://img2/reshui.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"暖电",
                desc:"7",
                "value":[400,80],
                symbolSize:[70,80],
                selected:true,
                symbol:'image://img2/nuandian.png',
                itemStyle: {
                    color: '#fff'
                }
            },


        ]
    },

        {
            type: 'lines',
            symbol: ['none', 'arrow'],
            symbolSize: 10,
            coordinateSystem: 'cartesian2d',
            label: {
                show: true,
                position: 'middle',
                fontSize:18,
                color:'#26abf0',
            },
            lineStyle: {
                normal: {
                    // color: '#fff',
                    color:'#26abf0',

                    width: 3,
                    opacity: 0.5,
                    curveness: 0,

                }
            },
            effect: {
                show: true,
                // smooth: false,
                trailLength: 0,
                symbol: "none", // ‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’
                // color: '#507577',
                symbolSize: 50,
                // symbol:planePath,
                // symbol:'none'
            },
            data: [
                {"name":"输入","coords":[[10,120],[80,120]],
                    desc:"4#5",//冷却塔:4-地源热泵主机:5
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[90,270],[0,150]],
                    desc:"0#4", //湿度:0-冷却塔:4
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[100,-70],[0,90]],
                    desc:"10#4", //温度:10-冷却塔:4
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[100,130],[100,190]],
                    desc:"5#1", //地源热泵主机:5-水蓄能:1
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[110,280],[275,240]],
                    desc:"0#2", //湿度:0-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[120,210],[280,210]],
                    desc:"1#2", //水蓄能:1-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[120,190],[285,110]],
                    desc:"1#6", //水蓄能:1-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[110,140],[285,205]],
                    desc:"5#2",  //地源热泵:5-新风机组;2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[110,120],[285,90]],
                    desc:"5#6", //地源热泵:5-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"输入","coords":[[110,25],[285,75]],
                    desc:"9#6", //地埋管:9-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[90,40],[285,200]],
                    desc:"9#2", //地埋管:9-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[110,-55],[285,60]],
                    desc:"10#6", //温度:10-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"输入","coords":[[450,170],[400,110]],
                    desc:"3#7", //太阳能:3-暖电:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[410,80],[480,80]],
                    desc:"7#8", //暖电:7-生活热水:8
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },


            ],

        }


    ],

};
var line_direction_option = {
    // backgroundColor: '#041235',
    // backgroundColor:'#ffffff',
    // 图的标题
    title: {
        // text: '夏季能源知识图谱',
        left: '-5',
        top: '10px',
        textStyle: {
            color: '#ffffff',
            fontFamily: '微软雅黑',
            fontWeight: 'lighter',
            fontSize: 18
        },


    },
    // 提示框的配置
    tooltip: {
        trigger: 'item',
        formatter:"{b0}",


    },
    // 工具箱
    // toolbox: {
    //     // 显示工具箱
    //     show: true,
    //     feature: {
    //         mark: {
    //             show: true
    //         },
    //         // 还原
    //         restore: {
    //             show: true
    //         },
    //         // 保存为图片
    //         saveAsImage: {
    //             show: true
    //         }
    //     }
    // },
    //     legend: [{
    //     // selectedMode: 'single',
    //     data: categories.map(function (a) {
    //     return a.name;
    // })
    // }],

    xAxis: {
        type: 'value',
        boundaryGap: false,
        show: false
    },
    yAxis: {
        type: 'value',
        show: false
    },
    series: [{
        type: 'graph',
        layout: 'none',
        // silent: true,          //不响应鼠标事件
        coordinateSystem: 'cartesian2d',
        symbolSize: 20,
        showEffectOn: 'render',
        zlevel: 2,
        rippleEffect: {
            period: 3, //波纹秒数
            brushType: 'fill', //stroke(涟漪)和fill(扩散)，两种效果
            scale: 10 //波纹范围
        },
        hoverAnimation: true,

        label: {
            normal: {
                show: true,
                position: 'bottom',//设置label显示的位置
                // formatter: '{c}',//设置label读取的值为value
                textStyle: {
                    fontSize: '18'
                },
            }
        },

        // label: {
        //     normal: {
        //         show: true
        //     }
        // },

        data: [
            // points
            {
                "name":"冷却塔",
                desc:"4",
                "value":[0,120],
                symbolSize:[80,120],
                symbol:'image://img2/lengqueta.png',
                selected:true,
                itemStyle: {
                    color: '#fff',
                }

            },
            {
                "name":"湿度",
                desc:"0",
                "value":[350,280],
                symbolSize:[70,85],
                symbol:'image://img2/humidity.png',
                selected:true,
                itemStyle: {
                    color: '#fff',
                }

            },
            // {
            //     "name":"太阳能",
            //     "value":[150,220],
            //     symbolSize:80,
            //     selected:true,
            //     symbol:'image://img/sun.png',
            //     itemStyle: {
            //         color: '#c23531'
            //     }
            // },
            {
                "name":"水蓄能",
                desc:"1",
                "value":[100,200],
                symbolSize:[80,75],
                selected:true,
                symbol:'image://img2/shuixuneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地源热泵主机",
                desc:"5",
                "value":[100,120],
                symbolSize:[75,70],
                selected:true,
                symbol:'image://img2/rebeng.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地埋管",
                desc:"9",
                "value":[100,30],
                symbolSize:[90,70],
                selected:true,
                symbol:'image://img2/pipe.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"温度",
                desc:"10",
                "value":[350,-5],
                symbolSize:[60,85],
                selected:true,
                symbol:'image://img2/tem.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"新风机组",
                desc:"2",
                "value":[310,210],
                symbolSize:[80,70],
                symbol:'image://img2/air.png',
                selected:true,
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地板辐射",
                desc:"6",
                "value":[310,80],
                symbolSize:[80,75],
                selected:true,
                symbol:'image://img2/floor.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"太阳能",
                desc:"3",
                "value":[450,180],
                symbolSize:[80,100],
                symbol:'image://img2/taiyangneng.png',
                selected:true,
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"生活热水箱",
                desc:"8",
                "value":[500,80],
                symbolSize:[60,80],
                selected:true,
                symbol:'image://img2/reshui.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"暖电",
                desc:"7",
                "value":[400,80],
                symbolSize:[70,80],
                selected:true,
                symbol:'image://img2/nuandian.png',
                itemStyle: {
                    color: '#fff'
                }
            },


        ]
    },

        {
            type: 'lines',
            symbol: ['none', 'arrow'],
            symbolSize: 10,
            coordinateSystem: 'cartesian2d',
            label: {
                show: true,
                position: 'middle',
                fontSize:18,
                color:'#26abf0',
            },
            lineStyle: {
                normal: {
                    // color: '#fff',
                    color:'#26abf0',

                    width: 3,
                    opacity: 0.5,
                    curveness: 0,

                }
            },
            effect: {
                show: true,
                // smooth: false,
                trailLength: 0,
                symbol: "none", // ‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’
                // color: '#507577',
                symbolSize: 50,
                // symbol:planePath,
                // symbol:'none'
            },
            data: [
                {"name":"输入","coords":[[10,120],[80,120]],
                    desc:"4#5",//冷却塔:4-地源热泵主机:5
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                // {"name":"影响","coords":[[90,270],[0,150]],
                //     desc:"0#4", //湿度:0-冷却塔:4
                //     effect: {
                //         show: false,
                //
                //         trailLength: 0,
                //         symbolSize: [30,30],
                //         symbol:'none'
                //         // symbol:'none'
                //         // symbol:'image://img/sun.png'
                //     },
                // },
                // {"name":"影响","coords":[[100,-70],[0,90]],
                //     desc:"10#4", //温度:10-冷却塔:4
                //     effect: {
                //         show: false,
                //
                //         trailLength: 0,
                //         symbolSize: [30,30],
                //         symbol:'none'
                //         // symbol:'none'
                //         // symbol:'image://img/sun.png'
                //     },
                // },
                {"name":"传递","coords":[[100,130],[100,190]],
                    desc:"5#1", //地源热泵主机:5-水蓄能:1
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[340,260],[310,235]],
                    desc:"0#2", //湿度:0-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                    lineStyle: {
                        normal: {
                            // color: '#fff',
                            color:'#fff',
                        }
                    },
                },
                {"name":"传递","coords":[[120,210],[280,210]],
                    desc:"1#2", //水蓄能:1-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[120,190],[295,100]],
                    desc:"1#6", //水蓄能:1-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[110,140],[285,205]],
                    desc:"5#2",  //地源热泵:5-新风机组;2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[110,120],[285,90]],
                    desc:"5#6", //地源热泵:5-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"输入","coords":[[110,25],[285,75]],
                    desc:"9#6", //地埋管:9-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[90,40],[285,200]],
                    desc:"9#2", //地埋管:9-新风机组:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[350,15],[325,60]],
                    desc:"10#6", //温度:10-地板辐射:6
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none',
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                    lineStyle: {
                        normal: {
                            // color: '#fff',
                            color:'#fff',


                        }
                    },
                },
                {"name":"输入","coords":[[450,170],[400,110]],
                    desc:"3#7", //太阳能:3-暖电:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[410,80],[480,80]],
                    desc:"7#8", //暖电:7-生活热水:8
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },


            ],

        }


    ],

};
var line_direction_option1 = {
    // backgroundColor: '#041235',
    // backgroundColor:'#ffffff',
    // 图的标题
    title: {
        // text: '冬季能源知识图谱',
        left: '-5',
        top: '10px',
        textStyle: {
            color: '#ffffff',
            fontFamily: '微软雅黑',
            fontWeight: 'lighter',
            fontSize: 18
        }
    },
    // 提示框的配置
    tooltip: {
        trigger: 'item',
        formatter:"{b0}",


    },
    // // 工具箱
    // toolbox: {
    //     // 显示工具箱
    //     show: true,
    //     feature: {
    //         mark: {
    //             show: true
    //         },
    //         // 还原
    //         restore: {
    //             show: true
    //         },
    //         // 保存为图片
    //         saveAsImage: {
    //             show: true
    //         }
    //     }
    // },
    //     legend: [{
    //     // selectedMode: 'single',
    //     data: categories.map(function (a) {
    //     return a.name;
    // })
    // }],

    xAxis: {
        type: 'value',
        boundaryGap: false,
        show: false
    },
    yAxis: {
        type: 'value',
        show: false
    },
    series: [{
        type: 'graph',
        layout: 'none',
        // silent: true,          //不响应鼠标事件
        coordinateSystem: 'cartesian2d',
        symbolSize: 20,
        showEffectOn: 'render',
        zlevel: 2,
        rippleEffect: {
            period: 3, //波纹秒数
            brushType: 'fill', //stroke(涟漪)和fill(扩散)，两种效果
            scale: 10 //波纹范围
        },
        hoverAnimation: true,


        // label: {
        //     normal: {
        //         show: true
        //     }
        // },
        label: {
            normal: {
                show: true,
                position: 'bottom',//设置label显示的位置
                // formatter: '{c}',//设置label读取的值为value
                textStyle: {
                    fontSize: '18'
                },
            }
        },

        data: [
            // points
            // {
            //     "name":"空气质量",
            //     desc:"0",
            //     "value":[500,0],
            //     symbolSize:[70,85],
            //     symbol:'image://img2/humidity.png',
            //     selected:true,
            //     itemStyle: {
            //         color: '#fff',
            //     },
            //     // label: {
            //     //     normal: {
            //     //         show: true,
            //     //         position: 'left',//设置label显示的位置
            //     //         // formatter: '{c}',//设置label读取的值为value
            //     //         textStyle: {
            //     //             fontSize: '18'
            //     //         },
            //     //     }
            //     // },
            // },
            {
                "name":"太阳能",
                desc:"1",
                "value":[20,430],
                symbolSize:[80,100],
                selected:true,
                symbol:'image://img2/taiyangneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"水蓄能",
                desc:"2",
                "value":[20,300],
                symbolSize:[80,80],
                selected:true,
                symbol:'image://img2/shuixuneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地源热泵",
                desc:"3",
                "value":[20,150],
                symbolSize:[75,80],
                selected:true,
                symbol:'image://img2/rebeng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地埋管",
                desc:"4",
                "value":[20,-30],
                symbolSize:[90,80],
                selected:true,
                symbol:'image://img2/pipe.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"温度",
                desc:"5",
                "value":[500,300],

                symbolSize:[65,85],
                selected:true,
                symbol:'image://img2/tem.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地板辐射",
                desc:"7",
                "value":[300,200],
                symbolSize:[80,80],
                selected:true,
                symbol:'image://img2/floor.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            // {
            //     "name":"新风机组",
            //     desc:"6",
            //     "value":[300,50],
            //     symbolSize:[80,70],
            //     symbol:'image://img2/air.png',
            //     selected:true,
            //     itemStyle: {
            //         color: '#fff'
            //     }
            //
            // },
            // {
            //     "name":"市电",
            //     desc:"8",
            //     "value":[400,150],
            //     symbolSize:[80,80],
            //     symbol:'image://img2/shidian.png',
            //     selected:true,
            //     itemStyle: {
            //         color: '#fff'
            //     }
            // },
            {
                "name":"生活热水箱",
                desc:"9",
                "value":[300,50],
                symbolSize:[60,80],
                selected:true,
                symbol:'image://img2/reshui.png',
                itemStyle: {
                    color: '#fff'
                }
            },

        ]
    },

        {
            type: 'lines',
            symbol: ['none', 'arrow'],
            symbolSize: 10,
            coordinateSystem: 'cartesian2d',
            label: {
                show: true,
                position: 'middle',
                fontSize:18,
                color:'#26abf0',
            },
            lineStyle: {
                normal: {
                    // color: '#fff',
                    color:'#26abf0',

                    width: 3,
                    opacity: 0.5,
                    curveness: 0,

                }
            },
            effect: {
                show: true,
                // smooth: false,
                trailLength: 0,
                symbol: "none", // ‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’
                // color: '#507577',
                symbolSize: 50,
                // symbol:planePath,
                // symbol:'none'
            },
            data: [
                // {"name":"影响","coords":[[485,0],[325,50]],
                //     desc:"0#6", //空气质量:0-新风机组:6
                //     effect: {
                //         show: false,
                //
                //         trailLength: 0,
                //         symbolSize: [30,30],
                //         symbol:'none'
                //         // symbol:'none'
                //         // symbol:'image://img/sun.png'
                //     },
                // },
                {"name":"输入","coords":[[20,430],[270,230]],
                    desc:"1#7", //太阳能:1-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[40,300],[270,210]],
                    desc:"2#7", //水蓄能:2-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[20,150],[270,190]],
                    desc:"3#7", //地源热泵主机:3-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[20,150],[290,40]],
                    desc:"3#9", //地源热泵主机:3-生活热水箱:9
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[485,285],[325,200]],
                    desc:"5#7", //温度:5-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"输入","coords":[[20,10],[20,110]],
                    desc:"4#3", //地埋管:4-地源热泵主机:3
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                // {"name":"输入","coords":[[410,150],[480,150]],
                //     desc:"8#9", //市电:8-生活热水箱:9
                //     effect: {
                //         show: false,
                //
                //         trailLength: 0,
                //         symbolSize: [30,30],
                //         symbol:'none'
                //         // symbol:'none'
                //         // symbol:'image://img/sun.png'
                //     },
                // },
                {"name":"传递","coords":[[20,180],[20,275]],
                    desc:"3#2", //地源热泵主机:3-水蓄能:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [30,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },


            ],

        }


    ],

};

var line_direction_option3 = {
    // backgroundColor: '#041235',
    // backgroundColor:'#ffffff',
    // 图的标题
    title: {
        // text: '冬季能源知识图谱',
        left: '-5',
        top: '10px',
        textStyle: {
            color: '#ffffff',
            fontFamily: '微软雅黑',
            fontWeight: 'lighter',
            fontSize: 18
        }
    },
    // 提示框的配置
    tooltip: {
        trigger: 'item',
        formatter:"{b0}",


    },
    // 工具箱
    // toolbox: {
    //     // 显示工具箱
    //     show: true,
    //     feature: {
    //         mark: {
    //             show: true
    //         },
    //         // 还原
    //         restore: {
    //             show: true
    //         },
    //         // 保存为图片
    //         saveAsImage: {
    //             show: true
    //         }
    //     }
    // },
    //     legend: [{
    //     // selectedMode: 'single',
    //     data: categories.map(function (a) {
    //     return a.name;
    // })
    // }],

    xAxis: {
        type: 'value',
        boundaryGap: false,
        show: false
    },
    yAxis: {
        type: 'value',
        show: false
    },
    series: [{
        type: 'graph',
        layout: 'none',
        // silent: true,          //不响应鼠标事件
        coordinateSystem: 'cartesian2d',
        symbolSize: 20,
        showEffectOn: 'render',
        zlevel: 2,
        rippleEffect: {
            period: 3, //波纹秒数
            brushType: 'fill', //stroke(涟漪)和fill(扩散)，两种效果
            scale: 10 //波纹范围
        },
        hoverAnimation: true,

        // label: {
        //     normal: {
        //         show: true
        //     }
        // },
        label: {
            normal: {
                show: true,
                position: 'bottom',//设置label显示的位置
                // formatter: '{c}',//设置label读取的值为value
                textStyle: {
                    fontSize: '18'
                },
            }
        },

        data: [
            // points
            // {
            //     "name":"空气质量",
            //     desc:"0",
            //     "value":[500,0],
            //     symbolSize:[70,85],
            //     symbol:'image://img2/humidity.png',
            //     selected:true,
            //     itemStyle: {
            //         color: '#fff',
            //     },
            // },
            {
                "name":"太阳能",
                desc:"1",
                "value":[20,430],
                symbolSize:[80,100],
                selected:true,
                symbol:'image://img2/taiyangneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"水蓄能",
                desc:"2",
                "value":[20,300],
                symbolSize:[80,80],
                selected:true,
                symbol:'image://img2/shuixuneng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地源热泵",
                desc:"3",
                "value":[20,150],
                symbolSize:[75,80],
                selected:true,
                symbol:'image://img2/rebeng.png',
                itemStyle: {
                    color: '#fff'
                },
                label: {
                    normal: {
                        show: true,
                        position: 'left',//设置label显示的位置
                        // formatter: '{c}',//设置label读取的值为value
                        textStyle: {
                            fontSize: '18'
                        },
                    }
                },
            },
            {
                "name":"地埋管",
                desc:"4",
                "value":[20,-30],
                symbolSize:[90,80],
                selected:true,
                symbol:'image://img2/pipe.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"温度",
                desc:"5",
                "value":[500,300],

                symbolSize:[65,85],
                selected:true,
                symbol:'image://img2/tem.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"地板辐射",
                desc:"7",
                "value":[300,200],
                symbolSize:[80,80],
                selected:true,
                symbol:'image://img2/floor.png',
                itemStyle: {
                    color: '#fff'
                }
            },
            {
                "name":"生活热水箱",
                desc:"9",
                "value":[300,50],
                symbolSize:[60,80],
                selected:true,
                symbol:'image://img2/reshui.png',
                itemStyle: {
                    color: '#fff'
                }
            },

        ]
    },

        {
            type: 'lines',
            symbol: ['none', 'arrow'],
            symbolSize: 10,
            coordinateSystem: 'cartesian2d',
            label: {
                show: true,
                position: 'middle',
                fontSize:18,
                color:'#26abf0',
            },
            lineStyle: {
                normal: {
                    // color: '#fff',
                    color:'#26abf0',

                    width: 3,
                    opacity: 0.5,
                    curveness: 0,

                }
            },
            effect: {
                show: true,
                // smooth: false,
                trailLength: 0,
                symbol: "none", // ‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’
                // color: '#507577',
                symbolSize: 50,
                // symbol:planePath,
                // symbol:'none'
            },
            data: [
                {"name":"输入","coords":[[20,430],[270,230]],
                    desc:"1#7", //太阳能:1-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[40,300],[270,210]],
                    desc:"2#7", //水蓄能:2-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[20,150],[270,190]],
                    desc:"3#7", //地源热泵主机:3-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[20,150],[290,40]],
                    desc:"3#9", //地源热泵主机:3-生活热水箱:9
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"影响","coords":[[485,285],[325,200]],
                    desc:"5#7", //温度:5-地板:7
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"输入","coords":[[20,10],[20,110]],
                    desc:"4#3", //地埋管:4-地源热泵主机:3
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },
                {"name":"传递","coords":[[20,180],[20,275]],
                    desc:"3#2", //地源热泵主机:3-水蓄能:2
                    effect: {
                        show: false,

                        trailLength: 0,
                        symbolSize: [20,30],
                        symbol:'none'
                        // symbol:'image://img/sun.png'
                    },
                },

            ],

        }


    ],

};


window.addEventListener("resize", function () {
    myLineChart.resize();
});
window.addEventListener("resize", function () {
    myLineChart1.resize();
});

